package com.mycompany.myapp.config.dbmigrations;

import com.mycompany.myapp.domain.mongodb.DemoEntity;
import com.mycompany.myapp.domain.mysql.Authority;
import com.mycompany.myapp.domain.mysql.User;
import com.mycompany.myapp.security.AuthoritiesConstants;

import com.github.mongobee.changeset.ChangeLog;
import com.github.mongobee.changeset.ChangeSet;
import org.springframework.data.mongodb.core.MongoTemplate;

import java.time.Instant;

/**
 * Creates the initial database setup
 */
@ChangeLog(order = "001")
public class InitialSetupMigration {

    @ChangeSet(order = "01", author = "initiator", id = "01-addDemoEntities")
    public void addAuthorities(MongoTemplate mongoTemplate) {
        DemoEntity demoEntity = new DemoEntity();
        demoEntity.setField1("field1");
        demoEntity.setField2("field2");
        demoEntity.setField3("field3");
        demoEntity.setField4("field4");
        mongoTemplate.save(demoEntity);
    }


}
